1 00:00:00,360 --> 00:00:00,630 All right. 2 00:00:00,630 --> 00:00:02,510 So today I'm going to finish off my teleporter. 3 00:00:02,520 --> 00:00:05,400 I'm going to add a sound effect for the teleportation process. 4 00:00:05,400 --> 00:00:10,170 And I'm also going to add I'm going to change the coloring of this while we're in cooldown. 5 00:00:10,170 --> 00:00:11,460 I'm going to gray it out. 6 00:00:11,550 --> 00:00:13,560 So let's get our sound. 7 00:00:13,560 --> 00:00:22,980 First, let's go to Toolbox Model's audio, and then I'm going to search for like a laser sound laser 8 00:00:22,980 --> 00:00:23,700 charge. 9 00:00:24,330 --> 00:00:25,470 Laser charge. 10 00:00:25,470 --> 00:00:26,940 I want something kind of short. 11 00:00:26,940 --> 00:00:28,830 I'll go with this, like two second one here. 12 00:00:30,390 --> 00:00:31,710 Yeah, that'll work. 13 00:00:31,740 --> 00:00:35,010 Let's go to our pad A That's this right here. 14 00:00:35,100 --> 00:00:41,580 I'm going to insert it into pad A so that the sound is close to where we are, where it makes sense. 15 00:00:41,730 --> 00:00:43,320 Let's call this charge. 16 00:00:43,920 --> 00:00:46,710 And I also want to do one for here, Right? 17 00:00:46,710 --> 00:00:50,190 So I'm going to do an alt click, select my pad B. 18 00:00:51,000 --> 00:00:55,290 And then I'll just duplicate charge control d keep the same sound. 19 00:00:55,500 --> 00:00:57,150 Just put it down there to pad B. 20 00:00:57,980 --> 00:00:58,390 All right. 21 00:00:58,400 --> 00:00:59,030 Nice. 22 00:01:00,380 --> 00:01:04,910 And I want these colors to change when we're in cooldown mode. 23 00:01:04,940 --> 00:01:09,170 This pad is going to be easy because we're referencing that in code already. 24 00:01:09,260 --> 00:01:12,830 This color here to an alt click this. 25 00:01:13,340 --> 00:01:14,960 This part here, I should say. 26 00:01:15,380 --> 00:01:21,290 Unfortunately, we weren't very careful with our naming, so I'm going to change that roof to like roof 27 00:01:21,320 --> 00:01:25,160 A just to give it a unique name so I could access it in the script. 28 00:01:25,640 --> 00:01:27,650 Let's go to our script teleport. 29 00:01:27,680 --> 00:01:33,920 Let's double click and get some references for our sounds and the parts that we want to change colors 30 00:01:33,920 --> 00:01:34,550 to. 31 00:01:34,850 --> 00:01:37,180 We'll do the sounds first, right? 32 00:01:37,190 --> 00:01:38,330 We could do a sound. 33 00:01:38,330 --> 00:01:40,250 A That's the charge. 34 00:01:40,250 --> 00:01:41,600 A Right. 35 00:01:41,600 --> 00:01:46,190 And that's going to be on pad a pad a charge. 36 00:01:47,210 --> 00:01:53,090 I'll do a sound, B on pad B charge, and then I need that roof part. 37 00:01:53,090 --> 00:01:54,290 So roof. 38 00:01:54,320 --> 00:01:59,260 I'll just say roof because we only have one for the script that is going to be on script dot, parent, 39 00:01:59,280 --> 00:02:02,030 dot, teleporter, a roof. 40 00:02:03,560 --> 00:02:04,250 All right. 41 00:02:04,250 --> 00:02:05,000 Nice. 42 00:02:05,000 --> 00:02:10,070 So when we come down in here, the if statement, if it's executed, we can teleport. 43 00:02:10,100 --> 00:02:14,480 The player exists after we turn teleportation process off. 44 00:02:14,480 --> 00:02:17,630 But before we actually move, let's play our sound. 45 00:02:17,630 --> 00:02:26,000 So I'll say sound a colon play and then let's wait until that's done playing or partially done. 46 00:02:26,000 --> 00:02:29,960 So I'm going to say, Wait, I have sound. 47 00:02:29,990 --> 00:02:31,100 Whoops, I spell it wrong. 48 00:02:31,100 --> 00:02:36,630 Sound a dot time length that will wait for the whole time length. 49 00:02:36,680 --> 00:02:39,650 If we go to our charge, this is sound a right. 50 00:02:41,130 --> 00:02:42,480 Down here on timeline. 51 00:02:42,520 --> 00:02:44,540 We have 1.9, 6 seconds. 52 00:02:44,550 --> 00:02:48,870 You can see it's grayed out because you can't change it here, but you can see the length of time. 53 00:02:49,350 --> 00:02:49,790 All right. 54 00:02:49,800 --> 00:02:53,120 What I'm going to do is I'm going to leave before it's finished. 55 00:02:53,130 --> 00:02:54,960 I'm going to teleport before it's finished. 56 00:02:54,990 --> 00:02:57,180 I'm going to do Time's point eight. 57 00:02:57,180 --> 00:03:04,230 So when this is 80% done playing, we'll go ahead and do our our translocation. 58 00:03:04,830 --> 00:03:05,580 Nice. 59 00:03:05,700 --> 00:03:15,540 And let's go ahead and do the same for B to C, I'm going to copy these to control C, I'm going to 60 00:03:15,540 --> 00:03:17,970 do it right. 61 00:03:18,240 --> 00:03:18,510 Let's see. 62 00:03:18,510 --> 00:03:20,070 We got our cool down. 63 00:03:21,180 --> 00:03:21,960 Yeah, I'll do it. 64 00:03:21,960 --> 00:03:29,010 I'll do it above where we change the flag so people can't get in there while we're still playing our 65 00:03:29,010 --> 00:03:29,630 sound. 66 00:03:29,640 --> 00:03:30,870 I need to change this. 67 00:03:30,900 --> 00:03:35,250 The sound be because we don't want to play the one by the green one, right? 68 00:03:35,280 --> 00:03:37,740 We want to play the one in the box because that's where we're at. 69 00:03:37,890 --> 00:03:40,980 And all we'll do this is going to be the same length of time. 70 00:03:40,980 --> 00:03:42,960 So if you don't change this, you're not going to see anything different. 71 00:03:42,960 --> 00:03:44,190 But I like to keep it the same. 72 00:03:44,190 --> 00:03:44,640 Right. 73 00:03:45,510 --> 00:03:46,830 All right, let's try it. 74 00:03:51,350 --> 00:03:52,850 Let's run over here. 75 00:03:56,330 --> 00:03:57,260 That's pretty good. 76 00:04:02,830 --> 00:04:05,020 Yeah, I like it. 77 00:04:05,110 --> 00:04:06,880 All right, let's change these colors now. 78 00:04:06,880 --> 00:04:10,750 And then we'll get a test server so we can view it while somebody else does it. 79 00:04:10,750 --> 00:04:13,990 We'll have two people playing the test server, So we'll stop this. 80 00:04:14,200 --> 00:04:15,850 Let's go to our teleport. 81 00:04:16,300 --> 00:04:18,670 And remember, we want to dole out our colors. 82 00:04:18,670 --> 00:04:29,740 So right after we do our sound, but before we actually move, you could actually do it right after 83 00:04:29,740 --> 00:04:32,650 we move to if you want, we could do that there. 84 00:04:33,130 --> 00:04:33,470 Right. 85 00:04:33,490 --> 00:04:35,020 But before this cooldown. 86 00:04:35,020 --> 00:04:37,510 Wait, right before the cool down wait. 87 00:04:37,510 --> 00:04:42,640 We'll get our pad A and then we'll change the color. 88 00:04:42,640 --> 00:04:46,840 The brick color to brick color dot gray. 89 00:04:47,800 --> 00:04:50,020 And then the pad a material. 90 00:04:50,020 --> 00:04:50,860 It's glowing. 91 00:04:50,860 --> 00:04:51,370 Right. 92 00:04:51,370 --> 00:04:54,670 Let's go ahead and get the enum material. 93 00:04:55,420 --> 00:04:58,960 We'll change it to boring old plastic so it doesn't glow. 94 00:04:58,960 --> 00:05:01,330 And we also want to do this for the roof. 95 00:05:01,330 --> 00:05:07,390 So we have the roof, which is roof, but the variable just says roof would do that. 96 00:05:07,450 --> 00:05:08,410 We'll do the same order. 97 00:05:08,410 --> 00:05:17,320 We'll do brick color equals brick color dot gray, and then we'll do pad a oops roof material, sorry, 98 00:05:17,350 --> 00:05:25,660 rooftop material, E name material, plastic, boring old plastic. 99 00:05:25,960 --> 00:05:26,350 All right. 100 00:05:26,350 --> 00:05:29,680 And then when we're done, our cool down will turn these colors back on. 101 00:05:30,310 --> 00:05:30,410 Right? 102 00:05:30,520 --> 00:05:33,550 So this is going to gray out when we teleport copy. 103 00:05:34,000 --> 00:05:39,610 And then when this gets turned to true, we'll do it right. 104 00:05:39,610 --> 00:05:41,500 Like right after the teleport. 105 00:05:43,420 --> 00:05:45,580 We'll make these the original colors. 106 00:05:45,580 --> 00:05:48,100 We can't do the dot lime green, right? 107 00:05:48,100 --> 00:05:49,390 We have to do a new. 108 00:05:49,390 --> 00:05:54,430 Oh, that's lowercase, new lime green. 109 00:05:55,220 --> 00:05:55,490 Right. 110 00:05:55,570 --> 00:05:56,560 And then. 111 00:05:57,230 --> 00:05:59,090 This is going to be neon. 112 00:06:01,260 --> 00:06:04,710 This is going to be new lime green again. 113 00:06:04,710 --> 00:06:05,220 Control. 114 00:06:05,250 --> 00:06:07,560 See, this is the roof. 115 00:06:08,040 --> 00:06:08,430 Whoops. 116 00:06:08,430 --> 00:06:09,360 Control Z. 117 00:06:10,820 --> 00:06:11,720 I messed up. 118 00:06:12,680 --> 00:06:13,530 There you go. 119 00:06:13,550 --> 00:06:15,590 And then this is going to be the neon. 120 00:06:17,210 --> 00:06:18,770 All right, so that's the roof in the pad. 121 00:06:18,950 --> 00:06:20,100 We're going to change the colors. 122 00:06:20,120 --> 00:06:21,170 Let's try it out. 123 00:06:21,170 --> 00:06:26,950 But let's try it with a test server so we can actually view it while somebody else is teleporting. 124 00:06:26,960 --> 00:06:28,870 So I have the test here. 125 00:06:28,880 --> 00:06:36,590 This test tab two players are selected local server start and it's going to get two copies of my games 126 00:06:36,590 --> 00:06:40,880 Go game going with the same character, but twice you'll see. 127 00:06:42,580 --> 00:06:43,440 All right, here we go. 128 00:06:43,450 --> 00:06:48,910 We've got our test server starting up, and it's just the same copy of me twice. 129 00:06:48,910 --> 00:06:51,580 But it's still convenient because you can start watching. 130 00:06:51,580 --> 00:06:53,470 You can watch what the other guy is doing. 131 00:06:53,470 --> 00:06:53,800 Right. 132 00:06:53,800 --> 00:06:55,030 So I'm going to come over here. 133 00:06:55,450 --> 00:07:00,370 This guy is going to get in the guy on my left, and we're going to watch what happens to these pads 134 00:07:00,370 --> 00:07:01,300 on the right. 135 00:07:04,600 --> 00:07:07,090 And the pads went gray, right? 136 00:07:07,210 --> 00:07:09,660 If I click here, you can't hear this sound right. 137 00:07:09,670 --> 00:07:10,630 It's a quiet sound. 138 00:07:12,000 --> 00:07:12,720 Nice. 139 00:07:12,720 --> 00:07:13,320 That's pretty cool. 140 00:07:13,320 --> 00:07:14,860 And then the pads came back on. 141 00:07:14,880 --> 00:07:15,540 I like it.